﻿@model Forest.Cat.Admin.Models.Resumes.CareerGoalModel
@using Forest.Cat.Domain.Entities
@{
    ViewBag.Title = "求职意向";
    Layout = "~/Administration/Views/Shared/_JobseekerRoot.cshtml";
}
<script type="text/javascript">
    $(document).ready(function () {
        $('#jobCategoryList1').val($('#DesiredOccupation').val());
        $('#regionalismList1').val($('#DesiredLocation').val());
        $('#btnSubmit').bind('click', function () {
            $('#DesiredOccupation').val($('#jobCategoryList1').val());
            $('#DesiredLocation').val($('#regionalismList1').val());
        });
    });
</script>
@using (Html.BeginForm("CareerGoalEdit", "Resume", FormMethod.Post))
{
    <div class="Work_experience">
        <div class="Work_experience_title">
            @ViewBag.Title</div>
        <div class="Work_experience_box">
            <ul>
                <li>
                    <p>
                        工作类型:</p>
                    @{
    var radioButtonList = new SelectList(new List<SelectListItem> {
                    new SelectListItem { Text = "不限", Value="105101", Selected=true },
                    new SelectListItem { Text = "正式", Value="105102"},
                    new SelectListItem { Text = "兼职", Value="105103"},
                    new SelectListItem { Text = "实习", Value="105104"},
                    new SelectListItem { Text = "派遣", Value="105105"},
                    new SelectListItem { Text = "其他", Value="105999"},
                    }, "Value", "Text", "false");

    var htmlAttributes = new Dictionary<string, object> {
                    { "class", "radioButtonList" },
                    { "onclick", "if(eval(this.value)) { $('#tblDate').show('slow'); } else { $('#tblDate').hide('slow'); }" }
                };    
                    }
                    @foreach (var radiobutton in radioButtonList)
                    { 

                        @Html.RadioButtonFor(m => m.DesiredJobTypeString, @radiobutton.Value) @radiobutton.Text
                    }
                </li>
                <li>
                    <p>
                        地点:</p>
                    @{var index1 = 0;}
                    <select id="regionalismList1">
                        @foreach (var item in ViewBag.RegionalismList)
                        {
                            if (index1 == 0)
                            {
                            <option value="">请选择：</option>    
                            }
                            index1++;
                            <optgroup label="@item.Name">
                                <!--循环显示子类-->
                                @foreach (var subItem in (ViewBag.SubRegionalismList as List<Lov>).Where(x => x.ParentId.Value.Equals(item.Id)))
                                {
                                    <option value="@subItem.Value">@subItem.Name</option>
                                }
                            </optgroup>
                        }
                    </select>
                </li>
                <li>
                    <p>
                        行业:</p>
                    @Html.DropDownListFor(
                            x => x.DesiredIndustry,
                          ViewBag.Industrys as SelectList,
                          "请选择:",
                            new { @class = "long_select" })
                </li>
                <li>
                    <p>
                        职位:</p>
                    @{var index = 0;}
                    <select id="jobCategoryList1">
                        @foreach (var item in ViewBag.JobCategoryList)
                        {
                            if (index == 0)
                            {
                            <option value="">请选择：</option>    
                            }
                            index++;
                            <optgroup label="@item.Name">
                                <!--循环显示子类-->
                                @foreach (var subItem in (ViewBag.SubJobCategoryList as List<Lov>).Where(x => x.ParentId.Value.Equals(item.Id)))
                                {
                                    <option value="@subItem.Value">@subItem.Name</option>
                                }
                            </optgroup>
                        }
                    </select>
                </li>
                <li>
                    <p>
                        公司性质</p>
                    @Html.DropDownListFor(
                        x => x.DesiredCompanyType,
                        (SelectList)ViewBag.CompanyTypes,
                        "请选择：",
                        new { @class = "long_select" })</li>
                <li>
                    <p>
                        期望薪水范围(月薪):</p>
                    @Html.DropDownListFor(
                            x => x.DesiredSalary,
                                     (SelectList)ViewBag.SalaryRanges,
                          "请选择：",
                            new { @class = "long_select" })</li>
                
                <li>
                    <p>
                        到岗时间?</p>
                    <p>
                        我可以开始 @Html.DropDownListFor(
                                    x => x.CanStart,
                                  (SelectList)ViewBag.CanStarts,
             "请选择：",
                                    new { @class = "long_select" })</p>
                    @*                    <p>
                        或在此日期 @Html.TextBoxFor(x => x.StartOnYear, new { @class = "long_input" })
                        @Html.DropDownListFor(
                                    x => x.StartOnMonth,
                                           (SelectList)ViewBag.ListMonth,
                                           "月:",
                                    new { @class = "long_select" })
                        @Html.DropDownListFor(
                                    x => x.StartOnDay,
                                           (SelectList)ViewBag.ListDay,
                                           "日:",
                                    new { @class = "long_select" })
                        @Html.ValidationMessage("DataError")</p>*@ </li>
                <div class="workEdit_btns">
                    @Html.HiddenFor(x => x.Id)
                    @Html.HiddenFor(x => x.ReturnUrl)
                    @Html.HiddenFor(x => x.DesiredOccupation)
                    @Html.HiddenFor(x => x.DesiredLocation)
                    <input type="image" id="btnSubmit" src="../../../Administration/Content/images/icons-save-64-19.png" />或
                    <a href="@Model.ReturnUrl">取消</a></div>
            </ul>
        </div>
    </div>
}